<meta charset="utf-8">
<style>
    body{
        background: black url(game_bg_2_hd.jpg) no-repeat;
    }
    #shark{
        position: absolute;
        width:516px;
        height: 273px;
        background: url(shark2.png) no-repeat;
    }
</style>
<div id="shark"></div>
<script>
    var bgy = 0;
    var x = 0;
    function show(){
        x = x + 10;
        shark.style.left = x;
        if(bgy==-273*7){
            bgy = 0;
        }
        bgy = bgy - 273;
        shark.style.background = "url(shark2.png) 0px "+bgy+"px";
    }
    setInterval(show,400);
</script>